﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace TruckWatch.Cloud.Models
{
    public class GeoPoint
    {

        public GeoPoint()
        {
        }

        public GeoPoint(double latitude, double longitude)
        {
            this.Latitude = latitude;
            this.Longitude = longitude;
        }

        [Required(ErrorMessage="Latitude is Required")]
        public double Latitude { get; set; }
        [Required(ErrorMessage = "Longitude is Required")]
        public double Longitude { get; set; }

        public override string ToString()
        {
            return Latitude.ToString("0.00") + " " + Longitude.ToString("0.00");
        }
    }
}
